home *** CD-ROM | disk | FTP | other *** search
- UNERASE.DOC v1.0
- 05/28/86
- Eric Gans
- French Dep't UCLA
- Los Angeles, CA 90024
-
- Since immigrating to MS-DOS, I have felt the absence of a
- public domain undelete program that unlike UNDEL.COM will work on
- all kinds of disks. UNERASE is meant to fill this gap. (CP/M
- users can use my XRASE program for this purpose.)
-
- UNERASE should work on any disk up to 20 megs, or 30 if it
- has fewer than 12,800 blocks, which would be the case with a 4K
- "block size. (Since this is merely a question of buffer size, it
- would be easy to change.) It tests for DOS versions and won't
- ask for a path in version 1. If your deleted file is a text
- file, you have the option of viewing the doubtful blocks (those
- after the first) before accepting them back in the file.
-
- DBACK.COM
-
- Because unerasing on a hard disk is a delicate procedure
- (the FAT and part of the directory must be rewritten to disk), I
- have included in this ARC DBACK.COM, which will back up the FAT
- and root directory of a (hard) disk on another (floppy) disk, and
- restore it in case catastrophe strikes. DBACK makes a read-only
- file called DBACK.DRx (x = backed up drive) in the root directory
- of the backup drive. For extra security, run DBACK before
- unerasing; since the backup file is written on another disk it
- won't disturb the unerase procedure.
-
- DBACK is also useful for general disk security purposes,
- especially for assembly-language programmers who are often a
- keystroke or two away from trashing their disk.
-
- Don't forget to copy DBACK.COM to a backup disk. If it is
- on a different diskette than DBACK.DRx, you will be able to
- change disks while running the program. Just remember that if
- you ever need DBACK to restore your hard disk directory you won't
- be able to find it there!
-
- Notes:
-
- UNERASE gets its disk information from the boot sector of
- the disk. It then reads the FAT into memory and finds the
- filename of the lost file (its first byte has been replaced by E5
- to show erasure) in the appropriate directory, which is located
- on disk by following its path from the root disk directory. The
- first block of the file, if still unused, is tentatively
- restored. Since the length of the file has remained in the
- directory entry, the program moves through the FAT checking
- unused blocks. If you use the verify option, these blocks will
- be printed on screen for inspection (this only works for text
- since I haven't implemented a hex dump for object files). If you
- haven't been doing too much erasing on your disk and your lost
- file wasn't too fragmented, UNERASE should do the job.
-
- Undeleting in DOS is less reliable than in CP/M since the
- FAT block addresses (after the first, which is in the directory
- entry) are zeroed out, whereas CP/M keeps them all in the file
- directory until the file's entry is overwritten.
-
- I wonder what makes operating system writers so hard on
- accidental deletions; sophisticated MS-DOS is even more
- unforgiving than primitive CP/M. Why can't a reliable undelete
- utility be supplied with the system (UNIX does this, doesn't
- it??), or at least made available to programmers as a system
- call? DOS could implement this easily enough, for example by
- only zeroing out the deleted blocks in one copy of the FAT (there
- are always two) until the next disk write.